Skip to content

Fix retry-mode git context + push refresh commit immediately#761

Merged
rdimitrov merged 1 commit intomainfrom
fix-retry-and-refresh-push
Apr 21, 2026
Merged

Fix retry-mode git context + push refresh commit immediately#761
rdimitrov merged 1 commit intomainfrom
fix-retry-and-refresh-push

Conversation

@rdimitrov
Copy link
Copy Markdown
Member

Two bugs diagnosed from today's Renovate runs (#759 + its retry 24744962001):

1. workflow_dispatch retry mode: `gh pr view` needs `--repo` pre-checkout

The retry path failed at "Resolve PR number and head ref" with:

failed to run git: fatal: not a git repository (or any of the parent directories): .git

The step runs BEFORE `actions/checkout`, so `gh pr view` has no local `.git` to infer the repo from. Added `--repo "$GITHUB_REPOSITORY"` to the three pre-checkout `gh pr view` calls (two in the retry branch of the `pr` step, one in the retry branch of the `eff` step).

The earlier misleading "author ... is not an accepted bot" message in logs was just `bash -x`-style source echoing; the actual runtime never reached that branch.

2. Push the refresh commit immediately (don't batch with skill push)

Across multiple runs today — 24743070052, 24743776702, 24744962001 — the "Commit refreshed reference assets" step created a real local commit (~38 files, all the reference-asset + CRD regen output), but the `git push` only happened at the END of the workflow in the "Commit and push" step AFTER the skill. Every time the skill failed or was cancelled, that final push never ran, and the refresh commit died with the runner.

Example from run 24743070052's log:

```
[manual/upstream-toolhive-v0.23.1 2167ea4]
Refresh reference assets for toolhive v0.23.1
38 files changed, 69 insertions(+), 69 deletions(-)
```

...yet the PR ended up with only the one-line YAML bump.

Fix: push the refresh commit right after creating it. Skill can fail or hang without losing reference-asset updates.

This change was pushed to #760's branch but landed after its squash-merge, so it got orphaned. Re-shipping.

Testing

  • `gh workflow run upstream-release-docs.yml -f pr_number=` should no longer fail at the Resolve step
  • Refresh commits should appear on the PR within ~1 min of dispatch, before the skill even starts

🤖 Generated with Claude Code

Two bugs from the first real Renovate run (#759) and its retry:

1. workflow_dispatch retry failed at "Resolve PR number and head ref"
   with "failed to run git: fatal: not a git repository". The step
   runs BEFORE actions/checkout, so `gh pr view` has no git context
   to infer the repo from. Added `--repo "$GITHUB_REPOSITORY"` to the
   three gh pr view calls that run pre-checkout (HEAD_REF + AUTHOR
   in the retry branch of step "pr", plus BASE in the retry branch of
   step "eff"). The error message we initially saw ("author ... is
   not an accepted bot") was just the shell source being echoed by
   `bash -x`-like output; the actual runtime never got to that point.

2. The refresh commit (~38 files, reference-asset regeneration) was
   only pushed at the END of the workflow, after the skill. When the
   skill failed or was cancelled — which it did repeatedly today —
   the refresh commit died with the runner and PRs ended up with only
   the one-line YAML bump. Now push the refresh commit as soon as
   it's created, so the reference-asset work lands on the PR branch
   independent of skill outcome. This was a pending commit that got
   orphaned by #760's squash-merge; re-shipping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 21, 2026 20:37
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Apr 21, 2026 8:37pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes two operational issues in the Upstream Release Docs GitHub Actions workflow: (1) workflow_dispatch retry mode failing before checkout due to missing git context for gh pr view, and (2) refreshed reference-asset commits being lost when the later skill step fails/cancels before the final push.

Changes:

  • Add --repo "$GITHUB_REPOSITORY" to pre-checkout gh pr view calls used during workflow_dispatch retry mode.
  • Push the “refresh reference assets” commit immediately after it’s created (before the skill runs), so it persists even if later steps fail/cancel.

@rdimitrov rdimitrov merged commit 18ffb49 into main Apr 21, 2026
8 checks passed
@rdimitrov rdimitrov deleted the fix-retry-and-refresh-push branch April 21, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants